define(function(require,exports,module){
   'use strict';

    var React = require('reactAddons');

    module.exports = React.createClass({displayName: "exports",
        clickHandler:function(e){
            e.preventDefault();
            this.props.listData(e.currentTarget.dataset.page);
        },
        render:function(){
            var cx = React.addons.classSet;
            var preClass = cx({
                'previous':true,
                'disabled':this.props.pre_stop == true
            });
            var nextClass = cx({
                'next':true,
                'disabled':this.props.next_stop == true
            });

            return (
                React.createElement("nav", null, 
                    React.createElement("ul", {className: "pager"}, 
                        React.createElement("li", {className: preClass}, 
                            React.createElement("a", {href: "#", onClick: this.clickHandler, "data-page": this.props.page-1}, 
                                React.createElement("span", {"aria-hidden": "true"}, "←"), " Older"
                            )
                        ), 
                        React.createElement("li", {className: nextClass}, 
                            React.createElement("a", {href: "#", onClick: this.clickHandler, "data-page": this.props.page+1}, 
                                "Newer ", React.createElement("span", {"aria-hidden": "true"}, "→")
                            )
                        )
                    )
                )
            );
        }
    });

});